<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="text" name="haha">
    <button>提交</button>
    <button class="tem">强制刷新</button>
    <script>
        const btn = document.querySelector('button')
        console.log(location.search);//得到符号？后面的部分
        console.log(location.hash);//得到#后面部分

        let tem = document.querySelector('.tem')
        tem.addEventListener('click', function () {
            location.reload(true)//强制刷新 没有true就是普通刷新
        })
    </script>
</body>

</html>